import { EditorView, basicSetup } from "codemirror";
import { EditorState } from "@codemirror/state";
import { javascript } from "@codemirror/lang-javascript";
import { oneDark } from "@codemirror/theme-one-dark";
import { keymap } from "@codemirror/view";
import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
const el = document.querySelector(".card.editor");
const state = EditorState.create({
    extensions: [
        basicSetup,
        oneDark,
        history(),
        keymap.of([...defaultKeymap, ...historyKeymap]),
        javascript({
            jsx: true,
            typescript: true,
        }),
    ],
});
export { EditorView, state, el };
